﻿{% extends "admin/base_site.html" %}
{% load i18n %}
{% load dummy_extras %}

{% block extrastyle %}
    {{ block.super }}
    <link rel="stylesheet" type="text/css" href="{{ admin_media_prefix }}css/forms.css" />
    <link rel="stylesheet" type="text/css" href="/static/css/aristocles.css" />
{% endblock %}

{% block breadcrumbs %}
<div class="breadcrumbs">
    <a href="{{ back|default:"" }}../../../">{% trans "Home" %}</a> &rsaquo;
    <a href="{{ back|default:"" }}../../">{{ app_label|appname }}</a> &rsaquo;
    <a href="{{ back|default:"" }}../">{{ model_name }}</a> &rsaquo;
    {{ title }}
</div>
{% endblock %}

{% block content %}
    <div id="content-main">
        <form action="." method="post">{% csrf_token %}
            <div>
                {% if form.errors %}
                    <p class="errornote">Пожалуйста, исправьте ошибку ниже.</p>
                {% endif %}
                <fieldset class="module {% if form.groups.errors %}errors{% endif %} aligned">
                    {{ form.groups.errors }}
                    <div class="form-row">
                        {{ form.groups.label_tag }}:
                        {{ form.groups }}
                    </div>
                </fieldset>
                {% if students %}
                    <div class="module">
                        <table summary="{{ model_name_plural }}">
                            <caption><a href="{{ back|default:"" }}../" class="section">{{ model_name_plural }}</a></caption>
                            {% for student in students %}
                                <tr>
                                    <th scope="row" width="100%">
                                        {% if student.has_perm %}<a href="{{ back|default:"" }}../{{ student.id }}/">{% endif %}
                                            {{ student.name }}
                                        {% if student.has_perm %}</a>{% endif %}
                                    </th>
                                    <td>&nbsp;</td>
                                </tr>
                            {% endfor %}
                        </table>
                    </div>
                {% else %}
                    В этой группе нет студентов.
                {% endif %}
                <div>
                    <input type="submit" value="Просмотреть студентов" class="default" name="bygroup"/>
                </div>
            </div>
        </form>
    </div>
{% endblock %}
